<?php
/*
 while (list($name, $value) = each($HTTP_POST_VARS)) {
    echo "$name = $value<br/>\n";
 }
*/
$strScreenName = 'EnterColour';
$strQueryName = 'qryAddColour';
$strFormName = 'frmEnterColour';

     if (( ($_POST[intColourID]) || ($_GET[intColourID])) && (!$_POST[$strReprocessing])) {
             include (MODULE . "/action/qrySelectColour");
             if($_GET[intColourID]){
             	$_POST[intColourID] = $_GET[intColourID];	
             }
             $strTitle = "Update";
             $strButtonTitle = "update";
             $txtID = stripslashes($myrow["ID"]);
             $txtColour = stripslashes($myrow["Colour"]);
         }else{
             $strTitle = "Enter";
             $strButtonTitle = "save";
             if($txtID){ $txtID = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtID])); }
             if($txtColour){ $txtColour = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtColour])); }
     }
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='left' width='450'>";
}
echo "
<tr>
     <td>
         <table  width='450' cellpadding='0' cellspacing='0' border='0' class='Normal' align='center'>
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>$strTitle Colour</H2>
         </td>
     </tr>
";
// Upploaded = 0
echo (StartForm($strScreenName, "post", $strQueryName,array('intColourID'=>$_POST[intColourID],'strReprocessing'=>'True'),"","",$strFormName,"","return frmEnterColour_onsubmit()"));

echo "
     <tr>
         <td align='left' colspan='1'>
             <b>Colour :&nbsp;</b>
		</td>
         <td align='left' colspan='1'>
             <input type=\"text\" name=\"txtColour\" value = \"$txtColour\" size= \"30\" maxlength=\"50\">
         </td>
     </tr>

     <tr>
         <td align='right' colspan='2'>
             <input type='image' src='./images/$strButtonTitle.gif' alt='$strButtonTitle'>
         </td>
     </tr>
         </table
     </form>
     </td>
 </tr>
";
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
     //$strListAll = "true";
       //include (MODULE . "/screen/ListColour");
?>
<script language="JavaScript">
<!--
function frmEnterColour_onsubmit() 
{


     if(document.frmEnterColour.txtColour.value == "") {
         alert("Please enter Product Colour");
         document.frmEnterColour.txtColour.focus();
         document.frmEnterColour.txtColour.select();
         return(false);
     }


}
// -->
</script>
